<!-- 创伤指质控指标页面 -->
<template>
  <div class="emergency-rescue">
    <!-- <el-row type="flex" justify="end" style="padding-right: 40px" v-model="editState">
            <el-button type="primary" @click="update">{{ editState === false ? "保存" : "编辑" }}</el-button>
        </el-row> -->
    <el-form label-width="200px" class="pageForm">
      <el-row class="form-row">
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">数据完整度{{ ((nowNum / maxNum) * 100).toFixed(1) }}%</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <span class="emergency-title">基本信息</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="姓名" required>
                <el-input v-model="getPatientInfoData.name" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="性别" required>
                <el-select
                  v-model="getPatientInfoData.sex"
                  size="mini"
                  clearable
                  :disabled="editState"
                  style="width: 200px;"
                >
                  <el-option value="男" />
                  <el-option value="女" />
                  <el-option value="未知" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="年龄" required>
                <el-input v-model="getPatientInfoData.age" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="来院方式" required>
                <el-input
                  v-model="getPatientInfoData.comingWayCode"
                  size="mini"
                  style="width: 200px;"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="120离开现场时间" label-width="200px" required>
                <el-date-picker
                  v-model="getPatientInfoData.leaveScene120Time"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">预警联动</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="是否预警" required>
                <el-radio-group v-model="firstTouchPointsData.isWaring" :disabled="editState">
                  <el-radio :label="1">是</el-radio>
                  <el-radio :label="0">否</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">院内接诊</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-form-item label="入院途径" required>
              <el-radio-group v-model="firstTouchPointsData.isCommingHospitalWay" :disabled="editState">
                <el-radio label="急诊">急诊</el-radio>
                <el-radio label="门诊">门诊</el-radio>
                <el-radio label="其他医疗机构转入">其他医疗机构转入</el-radio>
                <el-radio label="其他">其他</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="到达急诊科时间" required>
                <el-date-picker
                  v-model="firstTouchPointsData.comEmergencyWardTime"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="到达急诊科是否死亡" label-width="200px" style="min-width: 420px" required>
                <el-radio v-model="firstTouchPointsData.isDie" :label="1" :disabled="editState">
                  是
                </el-radio>
                <el-radio v-model="firstTouchPointsData.isDie" :label="0" :disabled="editState">
                  否
                </el-radio>
              </el-form-item>
            </el-col>

          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="创伤教治团队到达时间" required>
                <el-date-picker
                  v-model="firstTouchPointsData.trumaTeamArrvingTime"
                  format="yyyy-MM-dd HH:mm:ss"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  type="datetime"
                  placeholder=""
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="门/急诊ID：">
                <el-input
                  v-model="getPatientInfoData.outpatientId"
                  size="mini"
                  style="width: 200px;"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="住院ID：">
                <el-input
                  v-model="getPatientInfoData.inpatientId"
                  size="mini"
                  style="width: 200px;"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <span class="emergency-title">MPDS</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-form-item label="MPDS：" required>
              <el-checkbox-group v-model="findDiagnosesData.MPDS" :disabled="editState">
                <el-checkbox label="mpds1">交通/运输事故</el-checkbox>
                <el-checkbox label="mpds2">高处坠落</el-checkbox>
                <el-checkbox label="mpds3">暴力袭击/侵犯</el-checkbox>
                <el-checkbox label="mpds4">动物咬伤/攻击</el-checkbox>
                <el-checkbox label="mpds5">烧伤(烫伤)爆炸伤</el-checkbox>
              </el-checkbox-group>
            </el-form-item>

          </el-col>
          <el-col :span="24">
            <el-form-item required>
              <el-checkbox-group v-model="findDiagnosesData.MPDS" :disabled="editState">
                <el-checkbox label="mpds6">锐器刺伤/枪伤/贯穿伤</el-checkbox>
                <el-checkbox label="mpds7">触电/雷击伤</el-checkbox>
                <el-checkbox label="mpds8">冬季运动损伤</el-checkbox>
                <el-checkbox label="mpds9">机械损伤</el-checkbox>
                <el-checkbox label="mpds10">创伤(其他创伤)</el-checkbox>
              </el-checkbox-group>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="病情判断：" required>
              <el-radio-group v-model="findDiagnosesData.diagnoseContent" :disabled="editState">
                <el-radio label="0">非急</el-radio>
                <el-radio label="1">亚急</el-radio>
                <el-radio label="2">急症</el-radio>
                <el-radio label="3">危重</el-radio>
                <el-radio label="4">濒危</el-radio>
                <el-radio label="5">已死亡</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">创伤评估</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="TI评分：" required>
                <el-input v-model="findDiagnosesData.tiScore" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="GCS评分：" required>
                <el-input v-model="findDiagnosesData.gcsScore" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="ISS/AIS评分" required>
                <el-input v-model="findDiagnosesData.iisScore" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <span class="emergency-title">辅助检查</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="全身快速CT：" required>
                <el-radio-group v-model="queryAEPostData.ctList" :disabled="editState">
                  <el-radio label="1">已做</el-radio>
                  <el-radio label="0">未做</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="胸片X片：" required>
                <el-radio-group v-model="queryAEPostData.xList" :disabled="editState">
                  <el-radio label="1">已做</el-radio>
                  <el-radio label="0">未做</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="胸片X片完成时间：" label-width="200px" required>
                <el-date-picker
                  v-model="queryAEPostData.xTime"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="骨盆X片：" required>
                <el-radio-group v-model="queryAEPostData.xList" :disabled="editState">
                  <el-radio label="1">已做</el-radio>
                  <el-radio label="0">未做</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="FAST：" required>
                <el-radio-group v-model="queryAEPostData.fastList" :disabled="editState">
                  <el-radio label="1">已做</el-radio>
                  <el-radio label="0">未做</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="FAST完成时间：" required>
                <el-date-picker
                  v-model="queryAEPostData.fastTime"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <span class="emergency-title">创伤抢救</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="输血准备时间（分钟）：" label-width="200px">
                <el-input v-model="firstTouchPointsData.time9" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="建立人工气道：" required>
                <el-radio-group v-model="firstTouchPointsData.statu1" :disabled="editState">
                  <el-radio :label="1">已做</el-radio>
                  <el-radio :label="0">未做</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="提出建立时间：" label-width="200px">
                <el-date-picker
                  v-model="firstTouchPointsData.time1"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="成功建立时间：" label-width="200px">
                <el-date-picker
                  v-model="firstTouchPointsData.time2"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="人工气道建立时间（分钟）：">
                <el-input v-model="firstTouchPointsData.time3" size="mini" :disabled="editState" />
              </el-form-item>
            </el-col>

          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="紧急手术：" label-width="200px" required>
                <el-radio-group v-model="firstTouchPointsData.statu2" :disabled="editState">
                  <el-radio :label="1">已做</el-radio>
                  <el-radio :label="0">未做</el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="提出手术医嘱时间：" label-width="200px">
                <el-date-picker
                  v-model="firstTouchPointsData.time4"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="开始手术时间：" label-width="200px">
                <el-date-picker
                  v-model="firstTouchPointsData.time5"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>

          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="术前准备时间（分钟）" label-width="200px" required>
                <el-input v-model="firstTouchPointsData.time6" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">患者转归</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="病人去向：" required>
                <el-input v-model="outcomeForm.outComeName" size="mini" style="width: 200px;" :disabled="editState" />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="出院时间：" label-width="200px" required>
                <el-date-picker
                  v-model="outcomeForm.leaveTime"
                  type="datetime"
                  size="mini"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
            <el-col :span="8">
              <el-form-item label="接收医院名称：" required>
                <el-input
                  v-model="outcomeForm.handHospitalName"
                  size="mini"
                  style="width: 200px;"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <span class="emergency-title">数据填报员</span>
          </el-col>
          <el-col :span="24">
            <el-divider />
          </el-col>
          <el-col :span="24">
            <el-col :span="8">
              <el-form-item label="数据填报员：" required>
                <el-input
                  v-model="getPatientInfoData.cw120FirstDoctorName"
                  size="mini"
                  style="width: 200px;"
                  :disabled="editState"
                />
              </el-form-item>
            </el-col>
          </el-col>
        </el-row>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import { getPatientInfo } from '@/api/green-channel/info'
import { firstTouchPoints } from '@/api/green-channel/getAllEvent'
import { findDiagnoses } from '@/api/green-channel/mpdsTrauma'
import { queryAEPost } from '@/api/green-channel/tab-request'
import { getStrokeOuts } from '@/api/green-channel/outcomeTrauma'
export default {
  props: ['checkrowdata'],
  data() {
    return {
      newExamine: {
        earlyWarning: '', // 是否预警
        coming_institution_code: '' // 入院途径
      },
      editState: false,
      getPatientInfoData: {
        name: '', // 姓名
        sex: '', // 性别
        age: '', // 年龄
        comway: '', // 来院方式
        leaveScene120Time: '', // 离开医院大门时间
        outpatientId: '', // 门诊ID
        inpatientId: '', // 住院ID
        cw120FirstDoctorName: '' // 建档人员
      }, // 基本信息数据
      firstTouchPointsData: { // 所有事件接口数据
        isWaring: '', // 是否开启预警
        isCommingHospitalWay: '', // 入院方式
        comEmergencyWardTime: '', // 到达急诊科时间
        isDie: '', // 到达急诊科是否死亡
        trumaTeamArrvingTime: '', // 床上救治小组到达时间
        time1: '', // 提出建议时间
        time2: '', // 成功建立时间
        time3: '', // 人工气道建立时间（分钟）
        time4: '', // 提出手术医嘱时间：
        time5: '', // 开始手术时间：
        time6: '',
        statu1: '', // 建立人工气道
        statu2: '', // 紧急手术
        time7: '', //
        time8: '', //
        time9: '' //
      },
      findDiagnosesData: {
        MPDS: [],
        mpdsInfo: null,
        diagnoseContent: '',
        tiScore: 0,
        gcsScore: 0,
        iisScore: 0
      },
      queryAEPostData: {
        ctList: [], // CT
        fastList: [], // 超声
        xList: [], // X片
        fastTime: '',
        xTime: ''
      },
      eventList: {
        event50004Info: null,
        event50005Info: null,
        event50006Info: null,
        event50007Info: null,
        event50008Info: null,
        event50009Info: null,
        event51800Info: null,
        event51802Info: null,
        event51810Info: null,
        event51812Info: null
      },
      outcomeForm: {
        handHospitalName: '',
        leaveTime: '',
        outComeName: ''
      },
      maxNum: 0, // 所有填写量
      nowNum: 0 // 当前填写量
    }
  },
  mounted() {
    this.init()
  },
  methods: {
    // 保存
    init() {
      this.getPatientInfo()
      this.firstTouchPoints()
      this.findDiagnoses()
      this.queryAEPost()
      this.getStrokeOuts()
      setTimeout(() => {
        this.integrity()
      }, 2000)
    },
    // update() {
    //     if (this.editState) {
    //         this.editState = false
    //     } else {
    //         this.editState = true
    //     }
    // },
    getPatientInfo() {
      getPatientInfo(
        this.checkrowdata.patientId,
        this.checkrowdata.dispatchId
      ).then((res) => {
        this.getPatientInfoData.name = res.name
        this.getPatientInfoData.sex = res.sex
        this.getPatientInfoData.age = res.age
        this.getPatientInfoData.comingWayCode = res.comingWayCode
        this.getPatientInfoData.outpatientId = res.outpatientId
        this.getPatientInfoData.inpatientId = res.inpatientId
        if (res.dispatchEmergens) {
          this.getPatientInfoData.leaveScene120Time = res.dispatchEmergens.leaveScene120Time
          this.getPatientInfoData.cw120FirstDoctorName = res.dispatchEmergens.cw120FirstDoctorName
        }
      })
    },
    firstTouchPoints() {
      firstTouchPoints({
        apiToken: this.$store.getters.apiToken,
        dispatchId: this.checkrowdata.dispatchId
      }).then(res => {
        console.log(1)
        if (res.code == 0) {
          if (res.data && res.data.length > 0) {
            res.data.forEach(el => {
              switch (el.event_id) {
                case 50004:
                  this.event50004Info = el
                  this.firstTouchPointsData.time1 = el.hit_time
                  break
                case 50005:
                  this.event50005Info = el
                  this.firstTouchPointsData.time2 = el.hit_time
                  this.firstTouchPointsData.statu1 = el.state
                  break
                case 50006:
                  this.event50006Info = el
                  this.firstTouchPointsData.time7 = el.hit_time
                  break
                case 50007:
                  this.event50007Info = el
                  this.firstTouchPointsData.time8 = el.hit_time
                  break
                case 50008:
                  this.event50008Info = el
                  this.firstTouchPointsData.time4 = el.hit_time
                  break
                case 50009:
                  this.event50009Info = el
                  this.firstTouchPointsData.time5 = el.hit_time
                  this.firstTouchPointsData.statu2 = el.state
                  break
                case 51800:
                  this.event51800Info = el
                  this.firstTouchPointsData.isWaring = el.state
                  break
                case 51802:
                  this.event51802Info = el
                  this.firstTouchPointsData.comEmergencyWardTime = el.hit_time
                  break
                case 51810:
                  this.event51810Info = el
                  this.firstTouchPointsData.isCommingHospitalWay = el.property2
                  break
                case 51811:
                  this.event51811Info = el
                  this.firstTouchPointsData.trumaTeamArrvingTime = el.hit_time
                  break
                case 51812:
                  this.event51812Info = el
                  this.firstTouchPointsData.isDie = el.state
                  break
                default:
                  break
              }
            })
            this.firstTouchPointsData.time3 = (new Date(this.firstTouchPointsData.time2).getTime() - new Date(this.firstTouchPointsData.time1).getTime()) / 1000 / 60
            this.firstTouchPointsData.time6 = (new Date(this.firstTouchPointsData.time5).getTime() - new Date(this.firstTouchPointsData.time4).getTime()) / 1000 / 60
            this.firstTouchPointsData.time9 = (new Date(this.firstTouchPointsData.time8).getTime() - new Date(this.firstTouchPointsData.time7).getTime()) / 1000 / 60
            if (!this.firstTouchPointsData.time3) {
              this.firstTouchPointsData.time3 = 0
            }
            if (!this.firstTouchPointsData.time6) {
              this.firstTouchPointsData.time6 = 0
            }
            if (!this.firstTouchPointsData.time9) {
              this.firstTouchPointsData.time9 = 0
            }
          }
        }
      })
    },
    findDiagnoses() {
      findDiagnoses({
        dispatchId: this.checkrowdata.dispatchId
      }).then(res => {
        if (res && res.length > 0) {
          res.forEach(el => {
            if (el.diagnoseType == 'trauma_ti') {
              if (el.diagnoseContent) {
                this.findDiagnosesData.tiScore = el.score
              }
            }
            if (el.diagnoseType == 'trauma_gcs') {
              if (el.diagnoseContent) {
                this.findDiagnosesData.gcsScore = el.score
              }
            }
            if (el.diagnoseType == 'trauma_iss') {
              if (el.diagnoseContent) {
                this.findDiagnosesData.iisScore = el.score
              }
            }
            let mpdsData = []
            if (el.diagnoseType == 'MPDS') {
              if (el.diagnoseContent) {
                mpdsData = JSON.parse(el.diagnoseContent)
              }
              this.findDiagnosesData.MPDS = mpdsData
              this.findDiagnosesData.diagnoseContent = el.grade
              this.findDiagnosesData.mpdsInfo = el
            }
          })
          console.log(this.findDiagnosesData)
        }
      })
    },
    queryAEPost() {
      queryAEPost(this.checkrowdata.dispatchId).then(data => {
        /* 根据检查类型筛选数据*/
        this.queryAEPostData.ctList = data.filter(ele => ele.inspectionType === '全身快速CT')
        this.queryAEPostData.fastList = data.filter(ele => ele.inspectionType === '超声')
        this.queryAEPostData.xList = data.filter(ele => ele.inspectionType === 'X片')
        /* 根据检查类型筛选数据-End*/
        if (this.queryAEPostData.ctList.length > 0) {
          this.queryAEPostData.ctList = '1'
        } else {
          this.queryAEPostData.ctList = '0'
        }

        if (this.queryAEPostData.fastList.length > 0) {
          this.queryAEPostData.fastTime = this.queryAEPostData.fastList[0].diagnosticTime
          this.queryAEPostData.fastList = '1'
        } else {
          this.queryAEPostData.fastList = '0'
        }
        if (this.queryAEPostData.xList.length > 0) {
          this.queryAEPostData.xTime = this.queryAEPostData.xList[0].diagnosticTime
          this.queryAEPostData.xList = '1'
        } else {
          this.queryAEPostData.xList = ''
        }
      })
    },
    getStrokeOuts() {
      getStrokeOuts({
        dispatchId: this.checkrowdata.dispatchId
      }).then(res => {
        if (res.data) {
          this.hasData = true
          this.outcomeForm.handHospitalName = res.data.handHospitalName
          this.outcomeForm.leaveTime = res.data.leaveTime
          this.outcomeForm.outComeName = res.data.outComeName
          if (res.data.outComeName && res.data.outComeName === '死亡') {
            res.data.leaveTime = res.data.deathTime
            res.data.handHospitalName = '无'
          }
          if (res.data.outComeName && res.data.outComeName.indexOf('转') !== -1) {
            res.data.leaveTime = res.data.handTime
            res.data.handHospitalName = res.data.handHospitalName ? res.data.handHospitalName : '无'
          }
        }
      })
    },
    integrity() {
      this.maxNum = 0
      this.nowNum = 0
      for (const el in this.newExamine) {
        this.maxNum += 1
        if (this.newExamine[el]) {
          console.log(el, el)
          this.nowNum += 1
        }
      }

      for (const el in this.getPatientInfoData) {
        this.maxNum += 1
        if (this.getPatientInfoData[el]) {
          this.nowNum += 1
        }
      }

      for (const el in this.firstTouchPointsData) {
        this.maxNum += 1
        if (this.firstTouchPointsData[el]) {
          this.nowNum += 1
        }
      }

      for (const el in this.findDiagnosesData) {
        this.maxNum += 1
        if (this.findDiagnosesData[el]) {
          this.nowNum += 1
        }
      }

      for (const el in this.queryAEPostData) {
        this.maxNum += 1
        if (this.findDiagnosesData[el]) {
          this.nowNum += 1
        }
      }

      for (const el in this.outcomeForm) {
        this.maxNum += 1
        if (this.outcomeForm[el]) {
          this.nowNum += 1
        }
      }

      console.log(this.nowNum, this.maxNum)
    }
  }
}

</script>

<style lang="scss" scoped>
.emergency-rescue {
  .emergency-title {
    font-size: 20px;
    font-weight: 400;
  }

  .pageForm {
    padding: 0 30px;
  }

  .el-divider--horizontal {
    margin: 10px 0;
  }
}
</style>
